/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: VP Development
 * License Type: Purchased
 */
using System;
using System.Collections;
using Orm.Criteria;
using Orm;
using NHibernate;

namespace petshop {
	public class TransactionCriteria : AbstractORMCriteria {
		private DateTimeExpression _date;
		public DateTimeExpression Date {
			get {
				return  _date;
			}
			
		}
		
		private DoubleExpression _price;
		public DoubleExpression Price {
			get {
				return  _price;
			}
			
		}
		
		private Int32Expression _ID;
		public Int32Expression ID {
			get {
				return  _ID;
			}
			
		}
		
		public TransactionCriteria(ICriteria criteria) : base(criteria) {
			_date =  new DateTimeExpression("Date", this);
			_price =  new DoubleExpression("Price", this);
			_ID =  new Int32Expression("ID", this);
		}
		
		public TransactionCriteria(PersistentSession session) : this(session.CreateCriteria(typeof(Transaction))) {
		}
		
		public TransactionCriteria() : this(global::petshop.PetShopPersistentManager.Instance().GetSession()) {
		}
		
		public StaffCriteria CreateStaffCriteria() {
			return new StaffCriteria(CreateCriteria("staff"));
		}
		
		public CustomerCriteria CreateCustomerCriteria() {
			return new CustomerCriteria(CreateCriteria("customer"));
		}
		
		public PetCriteria CreatePetsCriteria() {
			return new PetCriteria(CreateCriteria("ORM_Pets"));
		}
		
		public Transaction UniqueTransaction() {
			return (Transaction)base.UniqueResult();
		}
		
		public Transaction[] ListTransaction() {
			IList lList = base.List();
			Transaction[] lValues = new Transaction[lList.Count];
			lList.CopyTo(lValues, 0);
			return lValues;
		}
		
	}
	
}

